home *** CD-ROM | disk | FTP | other *** search
/ kermit.columbia.edu / kermit.columbia.edu.tar / kermit.columbia.edu / newsgroups / misc.19960425-19960715 / 000000_news@columbia.edu _Thu Apr 25 09:46:34 1996.msg next >
Internet Message Format  |  1996-07-26  |  4KB

  1. Return-Path: news@columbia.edu
  2. Received: from apakabar.cc.columbia.edu (apakabar.cc.columbia.edu [128.59.35.159]) by watsun.cc.columbia.edu (8.7.5/8.7.3) with ESMTP id JAA01274 for <kermit.misc@watsun>; Thu, 25 Apr 1996 09:46:34 -0400 (EDT)
  3. Received: (from news@localhost) by apakabar.cc.columbia.edu (8.7.5/8.7.3) id JAA00590 for kermit.misc@watsun; Thu, 25 Apr 1996 09:46:32 -0400 (EDT)
  4. Path: news.columbia.edu!watsun.cc.columbia.edu!fdc
  5. From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
  6. Newsgroups: comp.protocols.kermit.misc
  7. Subject: Re: C-Kermit Script is not quitting after it sends the Page
  8. Date: 25 Apr 1996 13:46:14 GMT
  9. Organization: Columbia University
  10. Lines: 99
  11. Message-ID: <4lnvn6$i9@apakabar.cc.columbia.edu>
  12. References: <4lm2ik$4kn@dprmp3.dataprompt.com>
  13. NNTP-Posting-Host: watsun.cc.columbia.edu
  14.  
  15. In article <4lm2ik$4kn@dprmp3.dataprompt.com>,
  16. Shujaat Siddiqui <dpss@dprmp3.dataprompt.com> wrote:
  17. : I am working on simple Kermit script to page the Sysyem Administrators
  18. : if any Production Machine goes down.
  19. : We have Linux sitting on a P.C. which is a firewall connection to
  20. : the internet.  I am using that machine also to check the Main Production
  21. : machines out.
  22. : Since we have only numaric pagers provided by our company, I am
  23. : using the following Kermit Script to send the pager out.
  24. : ****************** BEGINNIG OF SCRIPT ******************
  25. : set line /dev/modem    ; Set for second serial port on a SPARCstation die
  26. : set modem hayes    ; Set for Hayes modem
  27. : set local-echo on    ; Echo local (doesn't seem to work)
  28. : set duplex full    ; Echo local (doesn't seem to work)
  29. :
  30. These two are synonyms in C-Kermit so you only need one of them.
  31. They apply only to CONNECT mode, and since your script does not enter
  32. CONNECT mode, they do indeed have no effect.  If you want to watch what's
  33. going on during the dialing process, use "set dial display on", like it
  34. says in the book, "Using C-Kermit".
  35.  
  36. : set parity even    ; Should set us to 7e1
  37. : set speed 19200    ; 1200 is max speed AirTouch seems to accept
  38. : ;set output pacing 1    ; Seems needed to work with AirTouch
  39. : define \%a 9,5109443
  40. : define \%b 8765432
  41. : output AT\13
  42. : input 3 OK
  43. : if fail stop 1 Can't get your modem's attention
  44. : output ATDT\%a,,,,,\%b##;\13
  45. : input 3 OK
  46. : if fail stop 1 Can't place call     
  47. : output exit\13
  48. :
  49. "output exit\13"?  But "exit" is not a modem command, is it?
  50. It certainly isn't going to the pager, since you do not have a data
  51. connection -- remember, numeric pagers do not answer the phone with a 
  52. carrier signal.
  53.  
  54. : pause 5
  55. : hangup
  56. : stop 0 Script succeeded
  57. : *************** END OF SCRIPT *************************
  58. : The problem I am having, is that above script does the job, which pages
  59. : sends the message correctly, but it never hangup and quit the Kermit
  60. : session.
  61. I don't know what you intended to accomplish with the "output exit\13"
  62. line, but you should probably just remove it.  In any case I don't see
  63. why the "pause 5" and "hangup" commands would not be executed, so this
  64. probably means that the modem is not responding to Kermit dropping the
  65. DTR signal, which in turn probably means that the modem is configured to
  66. ignore DTR transitions.  So instead of "hangup", try:
  67.  
  68.   pause 1
  69.   output +++
  70.   pause 1
  71.   output ATH0\13
  72.  
  73. or (assuming you are using C-Kermit 5A(190)):
  74.  
  75.   set dial modem-hangup on
  76.   hangup
  77.  
  78. Now if you want Kermit to exit when it is finished with the script, change:
  79.  
  80.   stop 0 Script succeeded
  81.  
  82. to:
  83.  
  84.   echo Script succeeded
  85.   exit
  86.  
  87. : Also if someone could give me some hints how to get variables outside of
  88. : the script instead of hard coding it in my Kermit script, so that I
  89. : would be able page more than one person at time.
  90. There are numerous ways to do this -- as parameters to macros, as
  91. command-line arguments, as environment variables, etc etc.  You should
  92. read the script programming chapters of "Using C-Kermit".
  93.  
  94. : ********************************************************************
  95. : *                                                                  *
  96. : * A foolish consistency is the hobgoblin of little minds.  Emerson *
  97. : *                                                                  *
  98. : ********************************************************************
  99. Emerson?  I though it was Ben Grimm...
  100.  
  101. - Frank